package com.neusoft.mapper;

import com.github.pagehelper.Page;
import com.neusoft.domain.Employee;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface EmployeeMapper {
    Page<Employee> getEmployeeByPage(@Param("account") String account, @Param("nickname") String nickname, @Param("telephone") String telephone);
    @Insert("insert into employee values(null,#{account},#{password},#{nickname},#{telephone},#{role},#{is_del} )")
    void saveEmployee(Employee employee);
    void updateEmployee(Employee employee);
    @Update("update employee set is_del=#{is_del} where id=#{id}")
    void updateEmployeeStatus(Employee employee);
}
